﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using System.Data;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Truycaphientai_value.Text =Application["Songuoitruycap"].ToString();
        GGnhieunhat();
        GGnhieu.ImageUrl = "~/anh/images_Luuli_ver1.0/img_GGN02.png";
        KMnew.ImageUrl = "~/anh/images_Luuli_ver1.0/img_KMnew.png";
    }
    protected void GGnhieu_Click(object sender, ImageClickEventArgs e)
    {
        GGnhieu.ImageUrl = "~/anh/images_Luuli_ver1.0/img_GGN02.png";
        KMnew.ImageUrl = "~/anh/images_Luuli_ver1.0/img_KMnew.png";
        GGnhieunhat();
    }
    protected void KMnew_Click(object sender, ImageClickEventArgs e)
    {
        KMnew.ImageUrl = "~/anh/images_Luuli_ver1.0/img_KMnew02.png";
        GGnhieu.ImageUrl = "~/anh/images_Luuli_ver1.0/img_GGN.png";
        KMmoinhat();
    }
    protected void GGnhieunhat()
    {
        SanPhamGiamGiaBLL tmp1 = new SanPhamGiamGiaBLL();
        DiaDiemGiamGiaBLL tmp2 = new DiaDiemGiamGiaBLL();
        PhieuGiamGiaBLL tmp3 = new PhieuGiamGiaBLL();
        DataTable a = tmp1.LayGiamGiaNhieuNhat();
        DataTable b = tmp2.LayGiamGiaNhieuNhat();
        DataTable c = tmp3.LayGiamGiaNhieuNhat();
        Spgiamgia.DataSource = a;
        Spgiamgia.DataBind();
        DDgiamgia.DataSource = b;
        DDgiamgia.DataBind();
        Pgiamgia.DataSource = c;
        Pgiamgia.DataBind();
    }
    protected void KMmoinhat()
    {
        SanPhamGiamGiaBLL tmp1 = new SanPhamGiamGiaBLL();
        DiaDiemGiamGiaBLL tmp2 = new DiaDiemGiamGiaBLL();
        PhieuGiamGiaBLL tmp3 = new PhieuGiamGiaBLL();
        DataTable a = tmp1.LaySPnew();
        DataTable b = tmp2.layDDmoinhat();
        DataTable c = tmp3.layPhieunew();
        Spgiamgia.DataSource = a;
        Spgiamgia.DataBind();
        DDgiamgia.DataSource = b;
        DDgiamgia.DataBind();
        Pgiamgia.DataSource = c;
        Pgiamgia.DataBind();
    }
}